create  table jms_dm.dm_spec_waybill_sum_dt 
(
     input_date             date         comment  '录入时间'
    ,business_type_code     varchar(255) comment  '业务类型code'
    ,agent_code             varchar(255) comment  '代理区编码'
    ,business_type_name     varchar(255) comment  '业务类型名称'
    ,business_type_name_en  varchar(255) comment  '业务类型英文名称'
    ,agent_name             varchar(255) comment  '代理区名称'
    ,brand_id               varchar(255) comment  '品牌id'
    ,brand_name             varchar(255) comment  '品牌名称'
    ,total_cnt              bigint comment  '总量'
    ,remind_cnt             bigint comment  '提醒量'
    ,not_remind_cnt         bigint comment  '未提醒量'
)
ENGINE=OLAP
DUPLICATE KEY(input_date, business_type_code, agent_code)
comment '操作平台-特殊件提醒汇总'
PARTITION BY RANGE (input_date) (
   START ("2023-11-15") END ("2023-11-30") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(agent_code, business_type_code) BUCKETS 1
PROPERTIES (
    "replication_num" = "3",
    "dynamic_partition.enable" = "true",
    "dynamic_partition.time_unit" = "DAY",
    "dynamic_partition.time_zone" = "Asia/Shanghai",
    "dynamic_partition.start" = "-180",
    "dynamic_partition.end" = "3",
    "dynamic_partition.prefix" = "p",
    "dynamic_partition.buckets" = "1",
    "in_memory" = "false",
    "storage_format" = "V2"
);